home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / appsrcs.zip / MORSETUP.ZIP / MORSETUP.H < prev    next >
C/C++ Source or Header  |  1993-06-04  |  9KB  |  283 lines

  1. /* Ownerb.h */
  2. #include <ctl3d.h>
  3.  
  4. #define WM_APPBAR_RESTART        (WM_USER+1001)
  5.  
  6. #define IDC_SCROLL            101
  7. #define IDC_CLOSEPROG            102
  8. #define IDC_BUTTONLOOK            103
  9. #define IDC_NOSOUND            104
  10. #define IDC_ICONS            110
  11. #define IDC_BUTTONS            120
  12. #define IDC_EDITS            140
  13. #define IDC_TEXTS            150
  14. #define IDC_RADIOS            160
  15. #define IDC_NEXT            170
  16.  
  17. #define IDD_STAYINFRONT         200
  18. #define IDD_ONELAUNCH            201
  19. #define IDD_CLOSEALL            202
  20. #define IDD_DEFAULT            203
  21. #define IDD_DOUBLECLICK            204
  22. #define IDD_BROWSE            205
  23. #define IDD_BIGBUTTONS            206
  24. #define IDD_TOP                210
  25. #define IDD_SCROLLTOP            211
  26. #define IDD_LEFT            220
  27. #define IDD_SCROLLLEFT            221
  28. #define IDD_BUTTONS            230
  29. #define IDD_SCROLLBUTTONS        231
  30. #define IDD_BORDER            242
  31. #define IDD_SCROLLBORDER        243
  32. #define IDD_HELP            251
  33. #define IDD_ROWS            240
  34. #define IDD_SCROLLROWS            241
  35. #define IDD_ABOUT            252
  36.  
  37. #define IDINIT_INIT            300
  38. #define IDINIT_CANCEL            301
  39. #define IDINIT_OK            302
  40. #define IDINIT_BROWSE            303
  41.  
  42. #define IDEXIT_NO            400
  43. #define IDEXIT_CANCEL            401
  44. #define IDEXIT_OK            402
  45. #define IDEXIT_RESTART            403
  46.  
  47. #define IDDIR_OK            600
  48. #define IDDIR_CANCEL            601
  49. #define IDDIR_LIST            602
  50. #define IDDIR_PATH            603
  51. #define IDDIR_TEXT            604
  52.  
  53. #define IDSOUND_OK            700
  54. #define IDSOUND_CANCEL            701
  55. #define IDSOUND_TEST            702
  56. #define IDSOUND_BROWSE            703
  57. #define IDSOUND_NONE            704
  58. #define IDSOUND_ENABLE            705
  59. #define IDSOUND_PROGSTART        709
  60. #define IDSOUND_PROGCLOSE        710
  61. #define IDSOUND_DROPFILE        711
  62. #define IDSOUND_ERROR            712
  63. #define IDSOUND_SOUNDDIR        713
  64. #define IDSOUND_HELP            714
  65.  
  66. #define IDSECTION_OK            801
  67. #define IDSECTION_CANCEL        802
  68. #define IDSECTION_DELETE        803
  69. #define IDSECTION_NEW            804
  70. #define IDSECTION_LIST            805
  71. #define IDSECTION_ADD            806
  72. #define IDSECTION_CURRENT        807
  73.  
  74. #define IDSAVE_TEXT            901
  75. #define IDSAVE_OK            902
  76. #define IDSAVE_NO            903
  77.  
  78. #define INI_APPMORE    "AppMore"
  79. #define INI_FILE    "appmore.ini"
  80.  
  81. #define LEFT        "Left"
  82. #define TOP        "Top"
  83. #define COLUMNS        "Columns"
  84. #define BUTTONS     "Buttons"
  85. #define ONELAUNCH    "OneLaunch"
  86. #define CLOSEALL    "CloseAll"
  87. #define DOUBLECLICK    "DoubleClick"
  88. #define BIGBUTTONS    "BigButtons"
  89. #define BORDER        "Border"
  90. #define STAYINFRONT    "StayInFront"
  91. #define INITIALIZED    "Initialized"
  92. #define DEFAULTICONDIR    "IconDirectory"
  93. #define NUMBEROFSECTIONS "NumberOfSections"
  94.  
  95. #define SOUNDENABLE    "EnableSound"
  96. #define PROGSTART    "ProgramStart"
  97. #define PROGCLOSE    "ProgramClose"
  98. #define DROPFILE    "DropFile"
  99. #define ERRORMESSAGE    "ErrorMessage"
  100. #define SOUNDDIR    "SoundDirectory"
  101.  
  102. #define ONELAUNCH_DEFAULT   0
  103. #define SECTIONS_DEFAULT    "0"
  104. #define SECTIONNAME_DEFAULT "<none>"
  105. #define LEFT_DEFAULT        -1
  106. #define TOP_DEFAULT        -1
  107. #define COLUMNS_DEFAULT        1
  108. #define BUTTONS_DEFAULT     8
  109. #define CLOSEALL_DEFAULT    1
  110. #define NOSOUND_DEFAULT     0
  111. #define CLOSEPROG_DEFAULT   1
  112. #define SHOWMODE_DEFAULT    0
  113. #define STAYINFRONT_DEFAULT 0
  114. #define INITIALIZED_DEFAULT 0
  115. #define ICONNUMBER_DEFAULT  0
  116. #define BUTTONLOOK_DEFAULT  0
  117. #define BIGBUTTONS_DEFAULT  0
  118. #define DOUBLECLICK_DEFAULT 0
  119. #define BORDER_DEFAULT        0
  120. #define SHELLGROUP_DEFAULT  "startup.grp"
  121.  
  122. #define SOUNDENABLE_DEFAULT    "0"
  123. #define PROGSTART_DEFAULT    "<none>"
  124. #define PROGCLOSE_DEFAULT    "<none>"
  125. #define DROPFILE_DEFAULT    "<none>"
  126. #define ERRORMESSAGE_DEFAULT    "<none>"
  127.  
  128.  
  129. #define MAXFILECHARS    70
  130. #define MAXDIGITS    5
  131. #define NUMICONS    5
  132. #define NUMEDITS    4
  133. #define NUMBUTTONS    11
  134. #define MAXAPPS     48
  135. #define MAXRES        1280
  136. #define MAXBORDER    15
  137. #define UP        1
  138. #define DOWN        0
  139.  
  140. #define APPMOREVERSION    400
  141.  
  142. typedef enum {NOTALIVE = FALSE, ALIVE = TRUE} STATUS;
  143.  
  144. typedef struct {
  145.     char    IcoName[MAXFILECHARS];
  146.     char    ProgName[MAXFILECHARS];
  147.     char    StartDir[MAXFILECHARS];
  148.     char    Params[MAXFILECHARS];
  149.     HWND    hWndApp;
  150.     int    IconNumber;
  151.     BOOL    ButtonLook;
  152.     STATUS    ProgStatus;
  153.     BOOL    Close;
  154.     short    ShowMode;
  155.     BOOL    NoSound;
  156.     } APPBARBUTTONS;
  157.  
  158. typedef struct {
  159.     short    Left;
  160.     short    Top;
  161.     int    Columns;
  162.     int    Buttons;
  163.     int    OneLaunch;
  164.     int    CloseAll;
  165.     int    DoubleClick;
  166.     int    StayInFront;
  167.     int    Initialized;
  168.     BOOL    BigButtons;
  169.     int    Border;
  170.     int    SectionNumber;
  171.     int    NumberOfSections;
  172.     char    SectionName[MAXFILECHARS];
  173.     char    DefaultIconDir[MAXFILECHARS];
  174.     } APPSYSTEM;
  175.  
  176. typedef struct {
  177.     int    EnableSound;
  178.     char    ProgramStart[MAXFILECHARS];
  179.     char    ProgramClose[MAXFILECHARS];
  180.     char    DropFile[MAXFILECHARS];
  181.     char    ErrorMessage[MAXFILECHARS];
  182.     char    SoundDirectory[MAXFILECHARS];
  183.     } APPSOUND;
  184.  
  185. typedef enum {EXEFOCUS = 0, PARAMFOCUS = 1, DIRFOCUS = 2, ICONFOCUS = 3} FOCUS;
  186. typedef enum {ICONFILES = 0, EXEFILES = 1, WAVEFILES = 2} BROWSEFILES;
  187.  
  188. char szBuffer[256];
  189. extern APPBARBUTTONS AppButton[MAXAPPS], AppButtonDefault, AppButtonTemp;
  190. extern APPSYSTEM     AppSystem, AppSystemNew;
  191. extern APPSOUND      AppSound, AppSoundNew;
  192. extern HWND         hwndIcon[NUMICONS], hwndScroll, hwndEdit[NUMEDITS];
  193. extern HWND         hWnd, hwndButton[NUMBUTTONS], hwndText[NUMEDITS];
  194. extern HWND         hwndRadioButton[3], hwndCloseProg, hwndNext[2];
  195. extern HWND         hwndButtonLook, hwndNoSound;
  196. extern HINSTANCE     hInst;
  197. extern HICON         hIcon[MAXAPPS], hIconTemp;
  198. extern HBITMAP         hAppSetup;
  199. extern BOOL         bSave, bCreate, bSaveButton[MAXAPPS];
  200. extern BOOL         bCurrentIcon[NUMICONS], bNewDir;
  201. extern int         iCurrent, iBlackIcon, iPrevBlackIcon;
  202. extern int         MaxIconNumber[MAXAPPS], cxChar, cyChar;
  203. extern FOCUS         nFocus;
  204. extern FARPROC         lpfnOldEdit[NUMEDITS];
  205. extern char         Directory[256], TempStr[256], szSectionName[256];
  206.  
  207. /* defined in ownerb.c */
  208. long WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
  209.  
  210. /* defined in appedit.c */
  211. long WINAPI EditProc(HWND, UINT, WPARAM, LPARAM);
  212.  
  213. /* defined in init.c */
  214. extern BOOL InitFirstInstance(HINSTANCE);
  215.  
  216. /* defined in border.c */
  217. extern VOID InnerBorder(HDC hDC, RECT rect);
  218.  
  219. /* defined in AppIni.c */
  220. extern VOID PASCAL IniRead(VOID);
  221. extern VOID PASCAL IniSave(VOID);
  222. extern int VerifySectionName(LPSTR szSectionName);
  223. extern VOID AddSectionName(LPSTR NewSectionName);
  224. extern VOID DeleteSectionName(LPSTR OldSectionName);
  225. extern VOID InitDefaultButton(VOID);
  226.  
  227. /* defined in AppChild.c */
  228. extern VOID UpdateEditWindows(int iCurrent);
  229. extern VOID UpdateRadioButtons(int iCurrentRB);
  230. extern VOID UpdateCheckBoxes(int iCurrent);
  231. extern VOID UpdateScrollIcons(int iCurrentIcon);
  232. extern VOID UpdateNextButtons(int);
  233. extern VOID CreateAllChildWindows(HWND hWnd, HINSTANCE hInst);
  234. extern VOID Insert(VOID);
  235. extern VOID Delete(VOID);
  236. extern VOID MoveUp(VOID);
  237. extern VOID MoveDown(VOID);
  238. extern VOID Next(int i);
  239.  
  240. /* defined in AppTools.c */
  241. extern VOID OkMsgBox(char *szCaption, char *szFormat, ...);
  242. extern VOID ErrorMsgBox(char *szCaption, char *szFormat, ...);
  243. extern VOID LoadIconFromFile(HICON *hIcon, int i);
  244. extern HBRUSH SetColorLightGray(HWND, HDC);
  245. extern HBRUSH SetColorStaticText(HWND, HDC);
  246. extern VOID LoadExeIcon(HICON *hIcon, int iCurrent);
  247. VOID PASCAL SetCaption(HWND hWndCaption, LPSTR CaptionName);
  248.  
  249. /* defined in appsys.c */
  250. BOOL WINAPI SystemDlgProc(HWND, UINT, WPARAM, LPARAM);
  251.  
  252. /* defined in appinit.c */
  253. BOOL WINAPI InitDlgProc(HWND, UINT, WPARAM, LPARAM);
  254.  
  255. /* defined in appexit.c */
  256. BOOL WINAPI ExitDlgProc(HWND, UINT, WPARAM, LPARAM);
  257.  
  258. /* defined in appbrows.c */
  259. extern BOOL PASCAL BrowseFile(char *FileName, HWND hWndCommDlgParent, BROWSEFILES FileType);
  260. BOOL WINAPI SelectDirDlgProc(HWND, UINT, WPARAM, LPARAM);
  261. extern void UpdateListBox(HWND hDlg);
  262. extern UINT GetListBoxIndex(HWND hDlg);
  263. extern void FileErrorHandler(void);
  264.  
  265. /* defined in appsound.c */
  266. BOOL WINAPI SoundDlgProc(HWND, UINT, WPARAM, LPARAM);
  267.  
  268. /* defined in appsectn.c */
  269. BOOL WINAPI SectionDlgProc(HWND, UINT, WPARAM, LPARAM);
  270.  
  271. /* defined in appsave.c */
  272. BOOL WINAPI SaveDlgProc(HWND, UINT, WPARAM, LPARAM);
  273.  
  274. /* defined in AppAbout.c */
  275. extern BOOL WINAPI AboutDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  276.  
  277. /*defined in AppBar.dll */
  278. extern TEXTMETRIC WINAPI RetrieveTextMetrics(HWND hWnd);
  279. extern void      WINAPI DrawBitmap(HDC hDC, short x, short y, HBITMAP hBitmap);
  280. extern APPBARBUTTONS WINAPI ReadButtonIni(int i, LPSTR SectionName, LPSTR IniFile);
  281. extern VOID WINAPI SaveButtonIni(APPBARBUTTONS AppButton, int i, LPSTR SectionName, LPSTR IniFile);
  282. extern APPBARBUTTONS WINAPI InitButton(VOID);
  283.